package com.yan.club.community.mapper;

import com.yan.club.community.model.SysCommunity;
import com.yan.club.community.model.SysCommunityExample;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author 彦
 * @since 2024/2/29 9:40
 */
@Mapper
public interface SysCommunityMapper {
    long countByExample(SysCommunityExample example);

    int deleteByExample(SysCommunityExample example);

    /**
     * delete by primary key
     *
     * @param deptId primaryKey
     * @return deleteCount
     */
    int deleteByPrimaryKey(Long deptId);

    /**
     * insert record to table
     *
     * @param record the record
     * @return insert count
     */
    int insert(SysCommunity record);

    int insertOrUpdate(SysCommunity record);

    int insertOrUpdateSelective(SysCommunity record);

    /**
     * insert record to table selective
     *
     * @param record the record
     * @return insert count
     */
    int insertSelective(SysCommunity record);

    List<SysCommunity> selectByExample(SysCommunityExample example);

    /**
     * select by primary key
     *
     * @param deptId primary key
     * @return object by primary key
     */
    SysCommunity selectByPrimaryKey(Long deptId);

    int updateByExampleSelective(@Param("record") SysCommunity record, @Param("example") SysCommunityExample example);

    int updateByExample(@Param("record") SysCommunity record, @Param("example") SysCommunityExample example);

    /**
     * update record selective
     *
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKeySelective(SysCommunity record);

    /**
     * update record
     *
     * @param record the updated record
     * @return update count
     */
    int updateByPrimaryKey(SysCommunity record);

    int updateBatch(List<SysCommunity> list);

    int updateBatchSelective(List<SysCommunity> list);

    int batchInsert(@Param("list") List<SysCommunity> list);
}